package org.zjx.swing.model;

public class RecognitionModel {
    private int currentIndex = 0;
    private final String[] wordList = {
            "汉字识别测试文本一",
            "汉字识别测试文本二",
            "汉字识别测试文本三",
            "汉字识别测试文本四"
    };

    public String getCurrentWord() {
        return wordList[currentIndex];
    }

    public void nextWord() {
        if (currentIndex < wordList.length - 1) {
            currentIndex++;
        }
    }

    public void previousWord() {
        if (currentIndex > 0) {
            currentIndex--;
        }
    }

    public String getAllWords() {
        return String.join("\n", wordList);
    }

    public void mergeWords(String smallText) {
        String mergedText = smallText + "\n" + getCurrentWord();
        System.out.println("合并结果：\n" + mergedText);
    }
}
